home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Utilities / ScriptKey folder / About ScriptKey next >
Encoding:
Text File  |  1994-07-26  |  4.8 KB  |  41 lines  |  [TEXT/ttxt]

  1. ScriptKey is an FKEY for executing AppleScript scripts. To install it, use your favourite FKEY installation tool. You may use ResEdit, but be careful when ResEditing your current System file. As with any FKEY, its single-digit resource ID number corresponds to the key you hit to invoke it: thus, if you give it ID 5, then you invoke it by hitting command-shift-5.
  2.  
  3. The scripts themselves are kept in a file called “ScriptKey Scripts”, which goes in your Preferences folder. I haven’t provided any tools for creating or manipulating this file, so you’ll have to do it with ResEdit. Each script is stored in an “scpt” resource; to get one of these, create the script as you normally do using the AppleScript Script Editor, and save it as a compiled script. Open the saved script file with ResEdit, copy the “scpt” resource you find in there, and paste it into ScriptKey Scripts. Simple. Keep the original script file around, in case you want to make further changes to the script.
  4.  
  5. Inside the ScriptKey Scripts file, the “scpt” resources are identified by name or number. You can use ResEdit’s “Get Resource Info” command to rename and renumber the script resources. Numbers can’t be negative, and names can’t consist entirely of digits (otherwise I couldn’t tell them from numbers), but otherwise you can use pretty much whatever names you are willing to type.
  6.  
  7. To actually use ScriptKey, invoke it by typing the command-shift-n sequence, where n was the single-digit resource ID you gave it when you installed it. If all goes well, you will hear a click. Next you type the name or number of the script you want to invoke. You will hear a click on each keystroke, to remind you that ScriptKey is reading your keystrokes. When typing a name, you don’t have to put in the entire name; just enough of it to unambiguously identify the script. Finish by pressing return or enter. If ScriptKey finds a script with the name or number you specified, you will hear a beep, then your script will execute. If anything went wrong, you will hear a raspberry sound.
  8.  
  9. If you invoke ScriptKey and then change your mind, or you make a mistake while entering the script name or number, press the delete key (escape or command-dot also work). You will hear a raspberry, and ScriptKey will exit.
  10.  
  11. Note: if your system volume is set to zero, naturally you won’t hear any of the audible feedback. Just thought I’d point this out.
  12.  
  13. Trivia note: the name of the ScriptKeys Scripts file is actually determined from the name of the FKEY itself. This may not seem very significant, except you could install two copies of the FKEY in your System file, call the second one, say, “More ScriptKeys”, and that one will automatically look in a file called “More ScriptKeys Scripts” for its scripts. Just thought I’d point this out, too.
  14.  
  15. Yet another note: Sometimes, after ScriptKey beeps to let you know it’s going to execute a script, your machine may seem to hang. You can still move the mouse pointer around, but there is no response to keystrokes or mouse clicks. Don’t panic—yet. What is probably happening is that the system is trying to send an AppleEvent, and not succeeding, and it can take up to two minutes for it to timeout and give up. One way to trigger this condition is to try to use ScriptKey when the active application is not AppleEvent-aware.
  16.  
  17. Note to the above note: because of a change I made in ScriptKey 1.1, the execution of the script now happens separately from the invocation of the FKEY itself. This means the above hang can manifest itself in the following variation:
  18.   * You invoke ScriptKey when application A is active. It beeps, and the script seems to execute OK.
  19.   * You switch to application B, and try to invoke ScriptKey from there. You get a raspberry after typing what you thought was a valid script name.
  20.   * You switch back to application A, and your machine hangs for up to two minutes.
  21.  
  22. What has happened is that the execution of the script you invoked from application A hasn’t finished its two-minute timeout yet. During script execution, the ScriptKey Scripts file is kept open for write access, so that I can save any changes made to script properties. However, this means that a further invocation of ScriptKey during this time will fail when it tries to open the ScriptKey Scripts file. The only remedy is to wait for the timeout period to elapse.
  23.  
  24. That’s all there is to it. I think the software is fairly safe to use, but I can’t guarantee it. If you hit any problems, let me know, and I’ll do my best to fix them, but basically it’s use at your own risk.
  25.  
  26. • Release notes
  27.  
  28. v1.0 1994 June 10
  29. Initial release
  30.  
  31. v1.1 1994 July 24
  32. restructured to execute script from a notification routine, rather than directly from the FKEY, to get around unexplained crashes in some applications.
  33.  
  34. Lawrence D’Oliveiro
  35. Information & Technology Services Division
  36. University of Waikato
  37. Private Bag
  38. Hamilton
  39. New Zealand
  40. Internet: ldo@waikato.ac.nz
  41. 1994 July 26